const express=require('express')
const router=express.Router()

//用户路由处理函数对应的中间件
const sup_Handler=require('../router_handler/supplier')
//导入验证数据中间件
const expressJoi=require('@escook/express-joi')

const {custsup_find,sup_schema,delete_schema,sup_update_schema}=require('../schema/user')

router.post('/findall',sup_Handler.supplierall)
router.post('/insert',expressJoi(sup_schema),sup_Handler.insertsupplier)
router.post('/delete',expressJoi(delete_schema),sup_Handler.deletesupplier)
router.post('/update',expressJoi(sup_update_schema),sup_Handler.updatesupplier)
router.post('/find',expressJoi(custsup_find),sup_Handler.supplierfind)
module.exports=router
